<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- This file documents the use of the GNU compilers.

Copyright © 1988-2023 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being "Funding Free Software", the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below).  A copy of the license is included in the section entitled
"GNU Free Documentation License".

(a) The FSF's Front-Cover Text is:

A GNU Manual

(b) The FSF's Back-Cover Text is:

You have freedom to copy and modify this GNU Manual, like GNU
     software.  Copies published by the Free Software Foundation raise
     funds for GNU development. -->
<title>PowerPC AltiVec Built-in Functions Available on ISA 2.07 (Using the GNU Compiler Collection (GCC))</title>

<meta name="description" content="PowerPC AltiVec Built-in Functions Available on ISA 2.07 (Using the GNU Compiler Collection (GCC))">
<meta name="keywords" content="PowerPC AltiVec Built-in Functions Available on ISA 2.07 (Using the GNU Compiler Collection (GCC))">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">

<link href="index.html" rel="start" title="Top">
<link href="Indices.html" rel="index" title="Indices">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="PowerPC-AltiVec_002fVSX-Built_002din-Functions.html" rel="up" title="PowerPC AltiVec/VSX Built-in Functions">
<link href="PowerPC-AltiVec-Built_002din-Functions-Available-on-ISA-3_002e0.html" rel="next" title="PowerPC AltiVec Built-in Functions Available on ISA 3.0">
<link href="PowerPC-AltiVec-Built_002din-Functions-Available-on-ISA-2_002e06.html" rel="prev" title="PowerPC AltiVec Built-in Functions Available on ISA 2.06">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
div.example {margin-left: 3.2em}
kbd.key {font-style: normal}
span:hover a.copiable-link {visibility: visible}
-->
</style>


</head>

<body lang="en_US">
<div class="subsubsection-level-extent" id="PowerPC-AltiVec-Built_002din-Functions-Available-on-ISA-2_002e07">
<div class="nav-panel">
<p>
Next: <a href="PowerPC-AltiVec-Built_002din-Functions-Available-on-ISA-3_002e0.html" accesskey="n" rel="next">PowerPC AltiVec Built-in Functions Available on ISA 3.0</a>, Previous: <a href="PowerPC-AltiVec-Built_002din-Functions-Available-on-ISA-2_002e06.html" accesskey="p" rel="prev">PowerPC AltiVec Built-in Functions Available on ISA 2.06</a>, Up: <a href="PowerPC-AltiVec_002fVSX-Built_002din-Functions.html" accesskey="u" rel="up">PowerPC AltiVec/VSX Built-in Functions</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Indices.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h4 class="subsubsection" id="PowerPC-AltiVec-Built_002din-Functions-Available-on-ISA-2_002e07-1"><span>6.60.23.3 PowerPC AltiVec Built-in Functions Available on ISA 2.07<a class="copiable-link" href="#PowerPC-AltiVec-Built_002din-Functions-Available-on-ISA-2_002e07-1"> &para;</a></span></h4>

<p>If the ISA 2.07 additions to the vector/scalar (power8-vector)
instruction set are available, the following additional functions are
available for both 32-bit and 64-bit targets.  For 64-bit targets, you
can use <var class="var">vector long</var> instead of <var class="var">vector long long</var>,
<var class="var">vector bool long</var> instead of <var class="var">vector bool long long</var>, and
<var class="var">vector unsigned long</var> instead of <var class="var">vector unsigned long long</var>.
</p>
<p>Only functions excluded from the PVIPR are listed here.
</p>
<div class="example smallexample">
<pre class="example-preformatted">vector long long vec_vaddudm (vector long long, vector long long);
vector long long vec_vaddudm (vector bool long long, vector long long);
vector long long vec_vaddudm (vector long long, vector bool long long);
vector unsigned long long vec_vaddudm (vector unsigned long long,
                                       vector unsigned long long);
vector unsigned long long vec_vaddudm (vector bool unsigned long long,
                                       vector unsigned long long);
vector unsigned long long vec_vaddudm (vector unsigned long long,
                                       vector bool unsigned long long);

vector long long vec_vclz (vector long long);
vector unsigned long long vec_vclz (vector unsigned long long);
vector int vec_vclz (vector int);
vector unsigned int vec_vclz (vector int);
vector short vec_vclz (vector short);
vector unsigned short vec_vclz (vector unsigned short);
vector signed char vec_vclz (vector signed char);
vector unsigned char vec_vclz (vector unsigned char);

vector signed char vec_vclzb (vector signed char);
vector unsigned char vec_vclzb (vector unsigned char);

vector long long vec_vclzd (vector long long);
vector unsigned long long vec_vclzd (vector unsigned long long);

vector short vec_vclzh (vector short);
vector unsigned short vec_vclzh (vector unsigned short);

vector int vec_vclzw (vector int);
vector unsigned int vec_vclzw (vector int);

vector signed char vec_vgbbd (vector signed char);
vector unsigned char vec_vgbbd (vector unsigned char);

vector long long vec_vmaxsd (vector long long, vector long long);

vector unsigned long long vec_vmaxud (vector unsigned long long,
                                      unsigned vector long long);

vector long long vec_vminsd (vector long long, vector long long);

vector unsigned long long vec_vminud (vector long long, vector long long);

vector int vec_vpksdss (vector long long, vector long long);
vector unsigned int vec_vpksdss (vector long long, vector long long);

vector unsigned int vec_vpkudus (vector unsigned long long,
                                 vector unsigned long long);

vector int vec_vpkudum (vector long long, vector long long);
vector unsigned int vec_vpkudum (vector unsigned long long,
                                 vector unsigned long long);
vector bool int vec_vpkudum (vector bool long long, vector bool long long);

vector long long vec_vpopcnt (vector long long);
vector unsigned long long vec_vpopcnt (vector unsigned long long);
vector int vec_vpopcnt (vector int);
vector unsigned int vec_vpopcnt (vector int);
vector short vec_vpopcnt (vector short);
vector unsigned short vec_vpopcnt (vector unsigned short);
vector signed char vec_vpopcnt (vector signed char);
vector unsigned char vec_vpopcnt (vector unsigned char);

vector signed char vec_vpopcntb (vector signed char);
vector unsigned char vec_vpopcntb (vector unsigned char);

vector long long vec_vpopcntd (vector long long);
vector unsigned long long vec_vpopcntd (vector unsigned long long);

vector short vec_vpopcnth (vector short);
vector unsigned short vec_vpopcnth (vector unsigned short);

vector int vec_vpopcntw (vector int);
vector unsigned int vec_vpopcntw (vector int);

vector long long vec_vrld (vector long long, vector unsigned long long);
vector unsigned long long vec_vrld (vector unsigned long long,
                                    vector unsigned long long);

vector long long vec_vsld (vector long long, vector unsigned long long);
vector long long vec_vsld (vector unsigned long long,
                           vector unsigned long long);

vector long long vec_vsrad (vector long long, vector unsigned long long);
vector unsigned long long vec_vsrad (vector unsigned long long,
                                     vector unsigned long long);

vector long long vec_vsrd (vector long long, vector unsigned long long);
vector unsigned long long char vec_vsrd (vector unsigned long long,
                                         vector unsigned long long);

vector long long vec_vsubudm (vector long long, vector long long);
vector long long vec_vsubudm (vector bool long long, vector long long);
vector long long vec_vsubudm (vector long long, vector bool long long);
vector unsigned long long vec_vsubudm (vector unsigned long long,
                                       vector unsigned long long);
vector unsigned long long vec_vsubudm (vector bool long long,
                                       vector unsigned long long);
vector unsigned long long vec_vsubudm (vector unsigned long long,
                                       vector bool long long);

vector long long vec_vupkhsw (vector int);
vector unsigned long long vec_vupkhsw (vector unsigned int);

vector long long vec_vupklsw (vector int);
vector unsigned long long vec_vupklsw (vector int);
</pre></div>

<p>If the ISA 2.07 additions to the vector/scalar (power8-vector)
instruction set are available, the following additional functions are
available for 64-bit targets.  New vector types
(<var class="var">vector __int128</var> and <var class="var">vector __uint128</var>) are available
to hold the <var class="var">__int128</var> and <var class="var">__uint128</var> types to use these
builtins.
</p>
<p>The normal vector extract, and set operations work on
<var class="var">vector __int128</var> and <var class="var">vector __uint128</var> types,
but the index value must be 0.
</p>
<p>Only functions excluded from the PVIPR are listed here.
</p>
<div class="example smallexample">
<pre class="example-preformatted">vector __int128 vec_vaddcuq (vector __int128, vector __int128);
vector __uint128 vec_vaddcuq (vector __uint128, vector __uint128);

vector __int128 vec_vadduqm (vector __int128, vector __int128);
vector __uint128 vec_vadduqm (vector __uint128, vector __uint128);

vector __int128 vec_vaddecuq (vector __int128, vector __int128,
                                vector __int128);
vector __uint128 vec_vaddecuq (vector __uint128, vector __uint128,
                                 vector __uint128);

vector __int128 vec_vaddeuqm (vector __int128, vector __int128,
                                vector __int128);
vector __uint128 vec_vaddeuqm (vector __uint128, vector __uint128,
                                 vector __uint128);

vector __int128 vec_vsubecuq (vector __int128, vector __int128,
                                vector __int128);
vector __uint128 vec_vsubecuq (vector __uint128, vector __uint128,
                                 vector __uint128);

vector __int128 vec_vsubeuqm (vector __int128, vector __int128,
                                vector __int128);
vector __uint128 vec_vsubeuqm (vector __uint128, vector __uint128,
                                 vector __uint128);

vector __int128 vec_vsubcuq (vector __int128, vector __int128);
vector __uint128 vec_vsubcuq (vector __uint128, vector __uint128);

__int128 vec_vsubuqm (__int128, __int128);
__uint128 vec_vsubuqm (__uint128, __uint128);

vector __int128 __builtin_bcdadd (vector __int128, vector __int128, const int);
vector unsigned char __builtin_bcdadd (vector unsigned char, vector unsigned char,
                                       const int);
int __builtin_bcdadd_lt (vector __int128, vector __int128, const int);
int __builtin_bcdadd_lt (vector unsigned char, vector unsigned char, const int);
int __builtin_bcdadd_eq (vector __int128, vector __int128, const int);
int __builtin_bcdadd_eq (vector unsigned char, vector unsigned char, const int);
int __builtin_bcdadd_gt (vector __int128, vector __int128, const int);
int __builtin_bcdadd_gt (vector unsigned char, vector unsigned char, const int);
int __builtin_bcdadd_ov (vector __int128, vector __int128, const int);
int __builtin_bcdadd_ov (vector unsigned char, vector unsigned char, const int);

vector __int128 __builtin_bcdsub (vector __int128, vector __int128, const int);
vector unsigned char __builtin_bcdsub (vector unsigned char, vector unsigned char,
                                       const int);
int __builtin_bcdsub_lt (vector __int128, vector __int128, const int);
int __builtin_bcdsub_lt (vector unsigned char, vector unsigned char, const int);
int __builtin_bcdsub_eq (vector __int128, vector __int128, const int);
int __builtin_bcdsub_eq (vector unsigned char, vector unsigned char, const int);
int __builtin_bcdsub_gt (vector __int128, vector __int128, const int);
int __builtin_bcdsub_gt (vector unsigned char, vector unsigned char, const int);
int __builtin_bcdsub_ov (vector __int128, vector __int128, const int);
int __builtin_bcdsub_ov (vector unsigned char, vector unsigned char, const int);
</pre></div>

</div>
<hr>
<div class="nav-panel">
<p>
Next: <a href="PowerPC-AltiVec-Built_002din-Functions-Available-on-ISA-3_002e0.html">PowerPC AltiVec Built-in Functions Available on ISA 3.0</a>, Previous: <a href="PowerPC-AltiVec-Built_002din-Functions-Available-on-ISA-2_002e06.html">PowerPC AltiVec Built-in Functions Available on ISA 2.06</a>, Up: <a href="PowerPC-AltiVec_002fVSX-Built_002din-Functions.html">PowerPC AltiVec/VSX Built-in Functions</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Indices.html" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>
